using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICCreditObjectMap : EntityTypeConfiguration<ICCreditObject>
    {
        public ICCreditObjectMap()
        {
            // Primary Key
            this.HasKey(t => t.FInterID);

            // Properties
            this.Property(t => t.FCreditLevel)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("ICCreditObject");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FCreditClass).HasColumnName("FCreditClass");
            this.Property(t => t.FCreditLevel).HasColumnName("FCreditLevel");
            this.Property(t => t.FCurrencyID).HasColumnName("FCurrencyID");
            this.Property(t => t.FAmount).HasColumnName("FAmount");
            this.Property(t => t.FQty).HasColumnName("FQty");
            this.Property(t => t.FDayControl).HasColumnName("FDayControl");
            this.Property(t => t.FCreditDays).HasColumnName("FCreditDays");
        }
    }
}
